package xiaoa.java.net;


import javax.net.SocketFactory;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.util.*;

/**
 */
public class SSLTest<T> {


    public static void main (String [] args)throws Throwable{


        // 获取一个工厂
        SocketFactory  sslFactory =   SSLSocketFactory.getDefault();

        // 创建连接
        SSLSocket socket =  (SSLSocket)sslFactory.createSocket("www.baidu.com" , 443);



    }





}
